@use "variables" as *;

// 全局样式
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: $text-color-primary;
  background: $bg-color;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  
  &:hover {
    background: rgba(0, 0, 0, 0.3);
  }
}

// Element Plus 样式覆盖
.el-menu {
  border-right: none !important;
}

.el-menu-item {
  &:hover {
    background-color: $hover-bg !important;
  }
  
  &.is-active {
    background-color: rgba($primary-color, 0.1) !important;
    color: $primary-color !important;
    
    &::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: $primary-color;
    }
  }
}

.el-card {
  border: 1px solid $border-color-light;
  box-shadow: none;
  
  .el-card__header {
    padding: 16px 20px;
    border-bottom: 1px solid $border-color-light;
  }
  
  .el-card__body {
    padding: 20px;
  }
}

.el-button--text {
  padding: 8px 12px;
  
  &:hover {
    background-color: $hover-bg;
  }
}

.el-form-item__label {
  font-weight: 500;
  color: $text-color-primary;
}

.el-input__inner {
  border-radius: $border-radius-base;
}

.el-message-box {
  border-radius: 8px;
}

// 工具类
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ml-auto {
  margin-left: auto;
}

.mr-auto {
  margin-right: auto;
}

// 响应式
@media (max-width: 768px) {
  .sidebar {
    width: 200px !important;
  }
  
  .message-item {
    padding: 12px 16px !important;
  }
  
  .settings-content {
    padding: 16px !important;
  }
}